package com.wc.AlgoOJ_train.train1.c4.A407;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/1/9 14:40
 * @description Snooker
 * http://43.138.190.70:8888/p/A407
 */
public class Main {
    static FastReader in = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        int[] dp = new int[19];
        // 单个球
        for (int i = 1; i <= 6; i++) {
            dp[i] = dp[i - 1] + 7 - i + 1;
        }
        // 超过6个球的时候
        for (int i = 7; i <= 18; i++) {
            dp[i] = dp[6] + (i - 6) * 8;
        }
        int n = in.nextInt();
        while (n-- > 0) {
            int ball = in.nextInt();
            int p = in.nextInt();
            int m = in.nextInt();
            if (dp[ball] + p >= m) {
                out.println("Yes");
            } else {
                out.println("No");
            }
        }
        out.flush();
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }
}
